import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request

// 查询设施监测设备类型全部
export const alarmFacilityDeviceTypeList = data => {
    return $get('/alarm/alarmFacilityDeviceType/list', data)
}

export const alarmFacilityDeviceTypeListByFacilityCode = facilityCode => {
  return $get('/alarm/alarmFacilityDeviceType/listByFacilityCode/'+facilityCode)
}

// 与上方属于同一接口，新增接口查询方式，防止修改后其他地方使用不了
export const alarmFacilityDeviceTypeListByFacilityCodeNo = data => {
  return $get('/alarm/alarmFacilityDeviceType/listByFacilityCodeNo', data)
}

export const alarmFacilityDeviceTypeListByFacilityId = facilityId => {
  return $get('/alarm/alarmFacilityDeviceType/listByFacilityId/'+facilityId)
}

// 查询设施监测设备类型列表
export const alarmFacilityDeviceTypePage = data => {
    return $get('/alarm/alarmFacilityDeviceType/page', data)
}

// 新增设施监测设备类型
export const alarmFacilityDeviceTypeAdd = data => {
    return $post('/alarm/alarmFacilityDeviceType/add', data)
}

// 查询设施监测设备类型详情
export const alarmFacilityDeviceTypeDetail = id => {
    return $get('/alarm/alarmFacilityDeviceType/detail/'+ id)
}

// 更新设施监测设备类型
export const alarmFacilityDeviceTypeUpdate = data => {
    return $post('/alarm/alarmFacilityDeviceType/update', data)
}

// 删除设施监测设备类型
export const alarmFacilityDeviceTypeDelete = id => {
    return $post('/alarm/alarmFacilityDeviceType/delete/'+ id)
}

// 导出设施监测设备类型
export const alarmFacilityDeviceTypeExport = (data,fileName) => {
    return $download('/alarm/alarmFacilityDeviceType/export',data, fileName)
}

//设施类型查询
export const alarmFacilityTypeList = data => {
  return $get('/alarm/alarmFacilityType/list', data)
}
